New projects are created
based on a project template. When creating a new project that will
be built into a DLL assembly that will be loaded into AutoCAD,
use the Class Library template that comes with Microsoft Visual
Studio or one of the AutoCAD Managed project application templates
that get installed with the ObjectARX Wizard for AutoCAD 2011. Both
types of templates are available for the VB.NET and C# programming
languages.
After a new project is
created, you will need to reference the files that make up the AutoCAD .NET
API. For information on referencing the files associated with the AutoCAD .NET
API and installing the ObjectARX Wizard for AutoCAD 2011, see Components
of the AutoCAD .NET API.
Procedures
To create a new project using a standard
template
- In Microsoft Visual Studio, click File
menu
New
Project.
- In the New Project dialog box, Project
Types tree, expand Other Languages
Visual Basic or Visual C# and click Windows.
- Under Templates, select Class Library.
- In the Name box, enter a name for the
new project.
- In the Location box, enter a location
or click Browse to select a folder for the new project.
- In the Solution Name box, enter a name
for the new solution that the project will be added to.
- Optionally, select the Create Directory
for Solution check box to create a sub-folder before creating the
new solution and project. Select the Add to Source Control check
box to add the solution and project to a source control database.
- Click OK.
To create a new project using an AutoCAD Managed
template
Before using one of the AutoCAD Managed
templates, you must first download and install the AutoCAD 2011 ObjectARX
SDK. For information on installing the AutoCAD Managed project
templates, see Components
of the AutoCAD .NET API.
- In Microsoft Visual Studio, click File
menu
New
Project.
- In the New Project dialog box, Project
Types tree, expand Other Languages and click Visual Basic or Visual
C#.
- Under Templates, select AutoCAD Managed
VB Project Application or AutoCAD Managed C# Project Application.
- In the Name box, enter a name for the
new project.
- In the Location box, enter a location
or click Browse to select a folder for the new project.
- In the Solution Name box, enter a name
for the new solution that the project will be added to.
- Optionally, select Create Directory for
Solution to create a sub-folder before creating the new solution
and project. Select Add to Source Control to add the solution and
project to a source control database.
- Click OK.
- In the AutoCAD Managed <language> Application
Wizard - <project name> dialog box,
go to the Your Registered Developer Symbol box, and enter a string
up to four characters long.
The symbol entered is
used as a prefix for the default class and command that is added
to the initial code module, and to avoid potential naming conflicts
with other referenced libraries.
- Optionally, if you will be working with
libraries that utilize unmanaged code, select Enable Unmanaged Debugging.
- Optionally, select any of the additional
.NET extensions you might need for your project.
- Click Finish.